<?php

namespace App\Console\Commands;

use Illuminate\Console\Command;
use Illuminate\Support\Facades\Cache;
use Illuminate\Support\Arr;

class Hello extends Command
{
    /**
     * The name and signature of the console command.
     *
     * @var string
     */
    protected $signature = 'app:hello';

    /**
     * The console command description.
     *
     * @var string
     */
    protected $description = 'Command description';

    /**
     * Execute the console command.
     */
    public function handle()
    {
        $name = Cache::get("name");
        $this->info($name);

//        $arr = [
//            ['user' => "a", 'message' => 'aaaa'],
//            ['user' => "b", 'message' => 'bbbb'],
//        ];
        $arr = [];
        $arr[] = ['user' => "c", 'message' => 'cccc'];
        $this->info(json_encode($arr));
    }
}
